-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul Config Management #266
Conversation
|
Nup, no idea, not even the slightest clue.....however it does sound really good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a very big PR and I didn't understand all of it, but I did understand that we are now actually checking if a feature is enabled or not and I see lots of tests so this gets a lgtm from me!
@@ -42,6 +42,7 @@ export const astroAttributes = newHTMLDataProvider('astro-attributes', { | |||
{ | |||
name: 'is:raw', | |||
description: 'Instructs the Astro compiler to treat any children of this element as text', | |||
valueSet: 'v', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to the config change, I just noticed that it had the wrong valueSet while testing things. This is very much harmless so figured I'd do it here
Changes
Configuration in language servers can work in two modes: push and pull. The former is what we're currently doing, where the client will push settings to the server at initialization, this mode is deprecated in favor of the later, pull.
In that mode, the server will pull configurations sections from the client, this does not make people necessarily happy and it is in fact, not as easy as implement and use as the previous mode but it allows for per-workspace and per-document settings, which is nice
So this PR migrates to pull mode, additionally this PR includes a refactor to our settings definitions inside the VS Code's extension
package.json
to make sure every settings is there with the proper names. Some settings were removed as they're features we don't support yet anyway.We also now respect the user's TS settings inside their editors. Previously we'd either force the default settings or force our own settings. This allow users to control the result of completions and code actions (for instance, if you have
typescript.preferences.quoteStyle
set todouble
, the completion will now always use"
).Some of the default settings are much better than what we forced on, notice how it recommends the aliases paths now, whereas previously it would recommend a relative path:
Testing
Tests updated for new config
Docs
The new settings are documented by their title and a short description